/*
 * @Author: NaturalHulk 2066634567@qq.com
 * @Date: 2023-12-26 09:39:53
 * @LastEditors: NaturalHulk 2066634567@qq.com
 * @LastEditTime: 2024-03-18 14:04:49
 * @FilePath: /wms/src/main.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from "vue";
import Cookies from "js-cookie";
import ElementPlus from "element-plus";
import locale from "element-plus/lib/locale/lang/zh-cn"; // 中文语言
import "@/assets/styles/index.scss"; // global css
import App from "./App";
import store from "./store";
import router from "./router";
import directive from "./directive"; // directive
// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 注册指令
import plugins from "./plugins"; // plugins
// import '@/assets/iconAli/iconfont.css'
import "../public/print-lock.css";
// svg图标
import "virtual:svg-icons-register";

import SvgIcon from "@/components/SvgIcon";

import elementIcons from "@/components/SvgIcon/svgicon";

import "./permission"; // permission control

// datav
import DataVVue3 from "@kjgl77/datav-vue3";

import inall from "./components/index";

// 可编辑表格
import VXETable from "vxe-table";

// import "intro.js/introjs.css"; // introjs默认css样式
// introjs还提供了多种主题，可以通过以下方式引入
import "intro.js/themes/introjs-modern.css"; // introjs主题

import "vxe-table/lib/style.css";
// 可滚动表格
import vue3SeamlessScroll from "vue3-seamless-scroll";
import "@/utils/rem";
const app = createApp(App);

// 可编辑表格
function useTable(app) {
  app.use(VXETable);
}
app.use(router);
app.use(store);
app.use(plugins);
app.use(elementIcons);
app.use(DataVVue3);
app.use(inall);
app.use(directive);
app.use(vue3SeamlessScroll);
app.use(useTable);

app.component("svg-icon", SvgIcon);

// 使用element-plus 并且设置全局的大小
app.use(ElementPlus, {
  locale: locale,
  // 支持 large、default、small
  size: Cookies.get("size") || "default",
});
app.mount("#app");
